
#include<string.h>
char **stringMatching(char **words, int wordsSize, int *returnSize)
{
    char **res = (char **)malloc(100 * sizeof(char *));

    // char res[100][31]={0},
    int in = 0;
    *returnSize = 0;
    for (int i = 0; i < wordsSize; i++)
    {
        for (int j = 0; j < wordsSize; j++)
        {
            if (i == j)
                continue;
            if (strstr(words[j], words[i]) != NULL)
            {
                res[in] = (char *)malloc(31);
                strcpy(res[in++], words[i]);
                (*returnSize)++;
                break;
            }
        }
    }

    return res;
}